#ifndef PAYWIDGET_H
#define PAYWIDGET_H

#include <QDialog>

namespace Ui {
class PayWidget;
}

class PayWidget : public QDialog
{
    Q_OBJECT
    
public:
    explicit PayWidget(QWidget *parent = nullptr);
    ~PayWidget();

    void setCheckInfo(QString total, QString discount);
    QString getPayType();
    float getActuallyPay();
    float getChange();


protected:
    void mouseMoveEvent(QMouseEvent *);
    void mousePressEvent(QMouseEvent *);
    void mouseReleaseEvent(QMouseEvent *);
    
private slots:
    void on_btnMenu_Close_clicked();
    void on_pbnConfirm_clicked();
    void on_radioButtonCash_clicked();
    void on_radioButtonStaffCard_clicked();
    void on_radioButtonWechat_clicked();
    void on_lineEditStaffCard_textChanged(const QString &arg1);

signals:
    void confirmPayment();

private:
    void initForm();
    void initParameters();

    Ui::PayWidget *ui;
    QPoint mousePoint;
    bool mousePressed;
};

#endif // PAYWIDGET_H
